﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
		<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
			<c:set var="ctx" value="${pageContext.request.contextPath}" />
			<html>

			<head>
				<link rel="stylesheet" href="${ctx}/common/common.css">
				<title>Title</title>
				<link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/layui/css/layui.css" media="all">
				<link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/style/admin.css" media="all">
				<script src="${ctx}/common/plugins/layuiadmin/layui/layui.js"></script>

				<style type="text/css">
					.rowtop {
						padding: 10px
					}

					.valtop {
						padding: 9px
					}

					.layui-col-md6 {
						border-bottom: 1px solid #e7e7e7;

					}

					.layui-form-label {
						width: 100px
					}
				</style>
			</head>

			<body>
				<div class="layui-col-md12" style="position: absolute; top: 27px; right: 40px; z-index: 1;">
					<!--通用table表格-->
					<div style="float: right" class="layui-btn-group paramBtn">
						<button type="button" id="rollback" class="layui-btn layui-btn-primary">返回</button>
					</div>
				</div>
				<form class="layui-form" action="${ctx}/enterprise/saveEnterprise" method="post"
					enctype="multipart/form-data">
					<div class="layui-fluid">
						<input type="hidden" name="id" value="${tenterprise.id}" />
						<input type="hidden" name="deleteFlag" value="0" />
						<div class="layui-row rowtop" style="margin-top: 20px;">
							<div class="layui-col-md6">
								<label class="layui-form-label">企业名称：</label>
								<div class="layui-input-block valtop">
									${tenterprise.name}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">企业简称：</label>
								<div class="layui-input-block valtop">
									${tenterprise.abbreviation}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">区域：</label>
								<div class="layui-input-block valtop">
									${areaname }
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">行业类别：</label>
								<div class="layui-input-block valtop">
									${industryname }
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">生产范围：</label>
								<div class="layui-input-block valtop">
									${proclaname }
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">企业网址：</label>
								<div class="layui-input-block valtop">
									${tenterprise.website}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">企业QS号：</label>
								<div class="layui-input-block valtop">
									${tenterprise.qs}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">企业SC号：</label>
								<div class="layui-input-block valtop">
									${tenterprise.sc}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">营业执照代码：</label>
								<div class="layui-input-block valtop">
									${tenterprise.code}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">经济性质：</label>
								<div class="layui-input-block valtop">
									<c:forEach items="${entType }" var="ent">
										<c:if test="${tenterprise.type==ent.code}">${ent.described }</c:if>
									</c:forEach>
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">注册地址：</label>
								<div class="layui-input-block valtop">
									${tenterprise.regAddress}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">生产地址：</label>
								<div class="layui-input-block valtop">
									${tenterprise.productAddress}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">法人：</label>
								<div class="layui-input-block valtop">
									${tenterprise.legalPerson}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">联系人：</label>
								<div class="layui-input-block valtop">
									${tenterprise.contact}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">联系电话：</label>
								<div class="layui-input-block valtop">
									${tenterprise.phone}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">电子邮箱：</label>
								<div class="layui-input-block valtop">
									${tenterprise.email}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">安全管理员：</label>
								<div class="layui-input-block valtop">
									${tenterprise.securityOfficer}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">生产状态：</label>
								<div class="layui-input-block valtop">
									<c:forEach items="${produceType }" var="produce">
										<c:if test="${tenterprise.productStat==produce.code}">${produce.described }
										</c:if>
									</c:forEach>
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">传真：</label>
								<div class="layui-input-block valtop">
									${tenterprise.fax}
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">邮编：</label>
								<div class="layui-input-block valtop">
									${tenterprise.postcode}
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">审核时间：</label>
								<div class="layui-input-block valtop">
									<fmt:formatDate value='${tenterprise.approvalTime}' pattern="yyyy-MM-dd HH:mm:ss" />
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">企业简介：</label>
								<div class="layui-input-block valtop">
									${tenterprise.introduction }
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">法人身份证：</label>
								<blockquote class="layui-elem-quote layui-quote-nm">

									<div class="layui-upload-list" id="lookcard">
										<div>
											<c:if
												test="${tenterprise.idcardTimg != nul && tenterprise.idcardTimg != '' }">
												<img style="width: 100px;height: 100px;"
													src="${ctx }${tenterprise.idcardTimg}" class="layui-upload-img">
											</c:if>
										</div>
									</div>
								</blockquote>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">企业LOGO：</label>
								<blockquote class="layui-elem-quote layui-quote-nm">

									<div class="layui-upload-list" id="looklogo">
										<div>
											<c:if test="${tenterprise.logoTimg != nul && tenterprise.logoTimg != '' }">
												<img style="width: 100px;height: 100px;"
													src="${ctx }${tenterprise.logoTimg}" class="layui-upload-img">
											</c:if>
										</div>
									</div>
								</blockquote>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">证照类型：</label>
								<div class="layui-input-block valtop">
									生产许可证
									<input type="hidden" name="licence_type" value="1" autocomplete="off"
										class="layui-input">
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">证照编号：</label>
								<div class="layui-input-block valtop">
									${licence1.licence_code }
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">发放日期：</label>
								<div class="layui-input-block valtop">
									<fmt:formatDate value='${licence1.grant_date}' pattern="yyyy-MM-dd" />
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">失效日期：</label>
								<div class="layui-input-block valtop">
									<fmt:formatDate value='${licence1.invalid_date}' pattern="yyyy-MM-dd" />
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">描述：</label>
								<div class="layui-input-block valtop">
									${licence1.described }
								</div>
							</div>
						</div>

						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">证照类型：</label>
								<div class="layui-input-block valtop">
									营业执照
									<input type="hidden" name="licence_type2" value="2" autocomplete="off"
										class="layui-input">
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">证照编号：</label>
								<div class="layui-input-block valtop">
									${licence2.licence_code }
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md6">
								<label class="layui-form-label">发放日期：</label>
								<div class="layui-input-block valtop">
									<fmt:formatDate value='${licence2.grant_date}' pattern="yyyy-MM-dd" />
								</div>
							</div>
							<div class="layui-col-md6">
								<label class="layui-form-label">失效日期：</label>
								<div class="layui-input-block valtop">
									<fmt:formatDate value='${licence2.invalid_date}' pattern="yyyy-MM-dd" />
								</div>
							</div>
						</div>
						<div class="layui-row rowtop">
							<div class="layui-col-md12">
								<label class="layui-form-label">描述：</label>
								<div class="layui-input-block valtop">
									${licence2.described }
								</div>
							</div>
						</div>
						<div class="layui-upload layui-row rowtop">
							<div class="layui-col-md12">
								<div class="layui-col-md6">
									<label class="layui-form-label">生产许可证：</label>
									<blockquote class="layui-elem-quote layui-quote-nm">

										<div class="layui-upload-list" id="looklicence">
											<div>
												<c:if
													test="${licence1.licence_timg != nul && licence1.licence_timg != '' }">
													<img style="width: 100px;height: 100px;"
														src="${ctx }${licence1.licence_timg }" class="layui-upload-img">
												</c:if>
											</div>
										</div>
									</blockquote>
								</div>
								<div class="layui-col-md6">
									<label class="layui-form-label">营业执照：</label>
									<blockquote class="layui-elem-quote layui-quote-nm">

										<div class="layui-upload-list" id="looklicence2">
											<div>
												<c:if
													test="${licence2.licence_timg != nul && licence2.licence_timg != '' }">
													<img style="width: 100px;height: 100px;"
														src="${ctx }${licence2.licence_timg }" class="layui-upload-img">
												</c:if>
											</div>
										</div>
									</blockquote>
								</div>
							</div>
						</div>
					</div>
				</form>

				<script>
					document.getElementById("rollback").addEventListener("click", function () {
						window.location.href = "${ctx}/supervise/enterprise/enterprisePage";
					})
					//Demo
					layui.use('form', function () {
						var form = layui.form;

						//监听提交
						form.on('submit(formDemo)', function (data) {
							layer.load(1, {
								shade: [0.1, '#fff'] //0.1透明度的白色背景
							});
							$("#formBtn").attr("disabled", true);
						});
					});

					layui.use('laydate', function () {
						var laydate = layui.laydate;
						//执行一个laydate实例
						laydate.render({
							elem: '#approval_time' //指定元素
							, type: 'datetime'
						});
					});
				</script>
			</body>

			</html>